import axios from '@/libs/api.request'
import config from '@/config'
// import store from '@/store'

// 告警 -> 实时告警
export const warnCount = (data) => {
  return axios.request({
    url: `${config.baseUrl.aiServer}warninghistory/countList`,
    data: JSON.stringify(data),
    method: 'post'
  })
}

// 告警列表
export const iotsysWarnList = (params, headers) => {
  return axios.request({
    url: `${config.baseUrl.gasServer}xdataRealWarn/listpage`,
    params: params,
    method: 'get',
    headers: {
      'Authorization': `Bearer ${sessionStorage.getItem('oauth_token')}`
    }
  })
}
